package com.gqs.bookstore.dao;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;

import com.gqs.bookstore.vo.Catalog;

public interface CatalogDao {
	//接口中可以不写方法的修饰符，对应的实现类中的方法会默认都加上public修饰符
	Catalog save(Catalog catalog) throws SQLException;//插入数据并且返回获得主键的catalog对象
	void save_only(Catalog catalog) throws SQLException;//仅仅是插入数据
	//删除和修改都是建立在要能查找到的基础上,所以先写查询接口
	Catalog findById(Long id) throws SQLException;
	List<Catalog> findAll() throws SQLException;
	
	void modify(Catalog catalog) throws SQLException;
	void delete(Long id) throws SQLException;
	
	void changeStatus(Long id, Integer status, Date updateAt) throws SQLException;
}

